local mouzhu = fk.CreateSkill{
    name = "ym1__mouzhu",
}
Fk:loadTranslationTable{
    ["ym1__mouzhu"] = "谋诛",
    [":ym1__mouzhu"] = "出牌阶段限X次，你可以视为使用一张本回合未以此法造成过伤害的火【杀】或【决斗】。（X为场上非主忠阵营人数）",
    ["#ym1__mouzhu"] = "谋诛：视为使用一张本回合未以此法造成过伤害的火【杀】或【决斗】",

    ["$ym1__mouzhu1"] = "杀了你们，天下都是我说了算！",
    ["$ym1__mouzhu2"] = "整顿天下，为国除害！",
}
mouzhu:addEffect("viewas",{
    anim_type = "offensive",
    pattern = "slash,duel",
    prompt = "#ym1__mouzhu",
    interaction = function (self, player)
        local all_names = {"fire__slash", "duel"}
        for _, value in ipairs(all_names) do
            if table.contains(player:getTableMark(mouzhu.name.."-turn"),value) then
                table.removeOne(all_names,value)
            end
        end
        local names = player:getViewAsCardNames(mouzhu.name, all_names)
        if #names == 0 then return end
        return UI.CardNameBox { choices = names, all_choices = all_names }
    end,
    card_filter = Util.FalseFunc,
    view_as = function(self, player, cards)
        if not self.interaction.data then return end
        local card = Fk:cloneCard(self.interaction.data)
        card.skillName = mouzhu.name
        return card
    end,
    times = function(self, player)
        return player.phase == Player.Play and
        #table.filter(Fk:currentRoom().alive_players, function (p)
            return p.role ~= "lord" and p.role ~= "loyalist"
        end) - player:usedSkillTimes(mouzhu.name, Player.HistoryPhase) or -1
    end,
    enabled_at_play = function(self, player)
        return #player:getTableMark(mouzhu.name.."-turn") < 2 and player:usedSkillTimes(mouzhu.name, Player.HistoryPhase) < #table.filter(Fk:currentRoom().alive_players, function (p)
            return p.role ~= "lord" and p.role ~= "loyalist"
        end) and player.phase == Player.Play
    end,
    enabled_at_response = Util.FalseFunc,
})
mouzhu:addEffect(fk.Damage,{
    can_refresh = function (self, event, target, player, data)
        if player == target or data.to == player then
            return data.card and table.contains(data.card.skillNames,mouzhu.name)
        end
    end,
    on_refresh = function (self, event, target, player, data)
        local mark = player:getTableMark(mouzhu.name.."-turn")
        table.insertIfNeed(mark,data.card.name)
        player.room:setPlayerMark(player,mouzhu.name.."-turn",mark)
    end,
})
return mouzhu